<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<%@ include file="/WEB-INF/views/include/head.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>角色管理</title>
    <script type="text/javascript">
        $(function () {
        })
    </script>
</head>
<body>
<ol class="breadcrumb">
    <li><a href="#">资源管理</a></li>
    <li><a href="#">基础信息</a></li>
    <li class="active"><a href="#">角色管理</a></li>
</ol>
<ul class="nav nav-tabs">
    <li class="active"><a href="${ctx}/resource/basic/role/">角色列表</a></li>
    <shiro:hasPermission name="basic:role:edit"><li ><a href="${ctx}/resource/basic/role/form" >添加角色</a></li> </shiro:hasPermission>
</ul>
<div id="myTabContent" class="tab-content">
    <div id="messageBox" class="alert alert-warning ${empty message ? 'hide' : ''}"><button data-dismiss="alert" class="close">×</button>
        <label id="loginError" class="error">${message}</label>
    </div>
    <div class="tab-pane fade active in" id="role">
        <table id="roleTable" class="table table-hover table-striped">
            <thead>
            <tr>
                <th>角色名<i class="sort"></i></th>
                <th>英文名<i class="sort"></i></th>
                <th>所属部门</th>
                <th>角色描述</th>
                <shiro:hasPermission name="basic:role:edit">
                    <th>操作</th>
                </shiro:hasPermission>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${list}" var="role">
                <c:if test="${role.showSign eq '1'}">
                    <tr>
                        <td>${role.name}</td>
                        <td>${role.enname}</td>
                        <td>${role.department.name}</td>
                        <td>${role.description}</td>
                        <shiro:hasPermission name="basic:role:edit">
                            <td>
                                <a href="${ctx}/resource/basic/role/form?id=${role.id}" >修改</a>
                                <a href="${ctx}/resource/basic/role/delete?id=${role.id}" > 删除</a>
                            </td>
                        </shiro:hasPermission>
                    </tr>
                </c:if>
            </c:forEach>
            </tbody>
        </table>
    </div>
</div>
</body>
</html>